package com.yjzx.config;

import com.yjzx.util.YamlToBean;

import java.io.InputStream;

/**
 * @author yjzx
 * @date 2024/4/20
 * @description 启动器
 */
public class YamlConfig {
    private static final YamlConfig instance = new YamlConfig();
    public static YamlConfig getInstance() {
        return instance;
    }
    private JarBean jarBean = null;

    public void initYamlConfig() {
        InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("jarTypeApplication.yaml");
        this.jarBean = YamlToBean.auto.yamlToJavaBean(inputStream, JarBean.class);
        this.jarBean.execute();
    }

}
